package com.lening.provider.controller.PropertyNotice;

import com.lening.common.base.BaseController;
import com.lening.provider.dto.PropertyNotice.ReminderMethodsDTO;
import com.lening.provider.po.PropertyNotice.ReminderMethodsPO;
import com.lening.provider.service.PropertyNotice.ReminderMethodsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 刘政华
 * @datetime 2024/6/5 14:07
 * @description 类对象
 */
@Slf4j
@RestController
@RequestMapping("reminderMethodss")
public class ReminderMethodsController extends BaseController<ReminderMethodsPO, ReminderMethodsDTO, ReminderMethodsService> {

    @Resource
    private ReminderMethodsService reminderMethodsService;

    @GetMapping("dropdown")
    public List<ReminderMethodsDTO> getNewList(@RequestParam(name = "reminderMethodName", required = false) String reminderMethodName){
        List<ReminderMethodsDTO> list = reminderMethodsService.getByName(reminderMethodName);
        return list;
    }
}
